/*
 * @Author: liujinjun681 liujinjun681@qq.com
 * @Date: 2022-06-27 10:46:56
 * @LastEditors: liujinjun681 liujinjun681@qq.com
 * @LastEditTime: 2022-11-10 15:33:06
 * @FilePath: \hd_ims_web\src\api\board\board.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import axios from '@/utils/request'
class ProcessService {
  /**
   * @description: 新增主表数据
   * @return {*}
   */
  save(data) {
    return axios.post('/project/processList', data)
  }
  /**
   * @description: 查询主表列表
   * @return {*}
   */
  getList(params) {
    return axios.get(`/project/processList/list`,{params})
  }
  /**
   * @description: 查询主表单据信息
   * @return {*}
   */
  getDetail(processId) {
    return axios.get(`/project/processList/${processId}`)
  }
  /**
   * @description: 查询字表信息
   * @return {*}
   */
  getListChild(processBillCode) {
    return axios.get(`/project/processList/queryByProcessBillCode/${processBillCode} `)
  }
  /**
   * @description: 新增子表数据
   * @return {*}
   */
  addchild(data) {
    return axios.post('/project/processList/addChild', data)
  }

  /**
   * @description: 删除子表数据
   * @return {*}
   */
  deleteChild(processChildId) {
    return axios.delete(`/project/processList/removeChild/${processChildId}`)
  }

  /**
   * @description: 删除主表数据
   * @return {*}
   */
  delete(processIds) {
    return axios.delete(`/project/processList/${processIds} `)
  }

  /**
   * @description: 查询机种代码
   * @return {*}
   */
  queryMachineCode() {
    return axios.get(`/project/processList/queryMachineCode`)
  }
  
}
export default new ProcessService()
